import Vue from 'vue'
import App from './App'
import uView from "uview-ui"
import { baseURL } from './utils/config.js'
import {noMultipleClicks} from './utils/index.js'

Vue.use(uView);


Vue.config.productionTip = false

App.mpType = 'app'


Vue.prototype.navigateTo = function(url) {
	uni.navigateTo({
		url: url
	})
}
Vue.prototype.switchTab = function(url) {
	uni.switchTab({
		url: url
	});
}

Vue.prototype.reLaunch = function(url) {
	uni.reLaunch({
		url: url
	});
}

Vue.prototype.showToast = function(title, icon, duration) {
	uni.showToast({
		icon: icon || 'none',
		title: title || '网络错误,请稍后重试!',
		duration: duration || 2000
	});
}

Vue.prototype.$baseURL = baseURL
Vue.prototype.$noMultipleClicks = noMultipleClicks

const app = new Vue({
	...App
})
app.$mount()
